using System;
using System.Web;

namespace SmartBoard.Core.Networking
{
    public class BadDelimiterException : Exception
    {
        public BadDelimiterException(string message) : base(message) 
        { }
    }

    public class MessageLengthException : Exception
    {
        public MessageLengthException(string message) : base(message) 
        { }
    }

    public class ProxyAuthenticationException : HttpException
    {
        public ProxyAuthenticationException(int code, string message)
            : base(code, message)
        { }
    }

    public class SSLAuthenticationException : Exception
    {
        public SSLAuthenticationException(string message) : base(message) 
        { }
    }

    public class SymmetricAuthenticationException : Exception
    {
        public SymmetricAuthenticationException(string message) : base(message) 
        { }
    }

    public class ReconnectAttemptException : Exception
    {
        public ReconnectAttemptException(string message, IBaseSocketConnectionCreator creator, Exception innerException, int attempt, bool maxReached)
            : base(message, innerException)
        {
            Attempt = attempt;
            MaxReached = maxReached;
            Creator = creator;
        }

        public int Attempt
        {
            get;
            private set;
        }

        public bool MaxReached
        {
            get;
            private set;
        }

        public IBaseSocketConnectionCreator Creator
        {
            get;
            private set;
        }
    }
}